package com.yuelao.java8;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Created by fengliye on 2017/10/7.
 */
public class LocalDateTest {
    public static void main(String[] args) {
        LocalDateTime localDateTime = LocalDateTime.now();
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        System.out.println(localDateTime.format(dateTimeFormatter));

    }
}
